-- GENERATED SPELL FOR [Anvilrage Officer] --


function spell0_8895(pUnit, Event) --@Backhand,n/a--
pUnit:FullCastSpellOnTarget(6253,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8895', 2285, 1)
end

function spell1_8895(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(9128,pUnit)
pUnit:RegisterEvent('Sorts_8895', 590, 1)
end

function spell2_8895(pUnit, Event) --@Divine Shield,Self--
pUnit:FullCastSpellOnTarget(13874,pUnit)
pUnit:RegisterEvent('Sorts_8895', 8288, 1)
end

function spell3_8895(pUnit, Event) --@Holy Light,Heal--
pUnit:FullCastSpellOnTarget(13952,pUnit)
pUnit:RegisterEvent('Sorts_8895', 2500, 1)
end

function spell4_8895(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15620,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8895', 685, 1)
end

function Sorts_8895(pUnit, Event)
local choix_sorts_8895 = math.random(0, 4)
if choix_sorts_8895 == 0 then
pUnit:RegisterEvent('spell0_8895', 1, 1)
end
if choix_sorts_8895 == 1 then
pUnit:RegisterEvent('spell1_8895', 1, 1)
end
if choix_sorts_8895 == 2 then
pUnit:RegisterEvent('spell2_8895', 1, 1)
end
if choix_sorts_8895 == 3 then
pUnit:RegisterEvent('spell3_8895', 1, 1)
end
if choix_sorts_8895 == 4 then
pUnit:RegisterEvent('spell4_8895', 1, 1)
end
end

function mob8895_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8895', math.random(1500, 3000), 1)
end

function mob8895_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8895_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8895_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8895, 1, 'mob8895_Action')
RegisterUnitEvent(8895, 2, 'mob8895_Leave')
RegisterUnitEvent(8895, 3, 'mob8895_Kill')
RegisterUnitEvent(8895, 4, 'mob8895_Die')
